package com.tsunami.authority.entity.admin;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.tsunami.base.entity.Entity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * 租户应用表
 *
 * @author tnmi
 * @date 2023/9/15 20:59
 **/
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@AllArgsConstructor
@ToString(callSuper = true)
@Accessors(chain = true)
@TableName("tnm_tenant_application")
@Schema(description = "租户开通应用")
public class TenantApplication extends Entity<Long> {

    /**
     * 租户编号
     */
    @Schema(description = "租户编号")
    @TableField(value = "tenant_code")
    private String tenantCode;
    /**
     * 租户名称
     */
    @Schema(description = "租户名称")
    @TableField(value = "tenant_name")
    private String tenantName;
    /**
     * 应用编号
     */
    @Schema(description = "应用编号")
    @TableField(value = "application_code")
    private String applicationCode;
    /**
     * 创建者-主管理员
     */
    @Schema(description = "租户ID")
    @TableField(value = "tenant_id")
    private Long tenantId;
    /**
     * 开通时间
     */
    @Schema(description = "开通时间")
    @TableField(value = "open_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime openTime;
    /**
     * 到期时间
     */
    @Schema(description = "到期时间")
    @TableField(value = "expire_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime expireTime;
    /**
     * 到期时间
     */
    @Schema(description = "最后一次续费时间")
    @TableField(value = "renewal_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime renewalTime;
}
